<?php
function p() {
	$argvs = func_get_args();
	echo "<div style=\"text-align: left;\">\r\n";
	foreach ($argvs as $v) {
		echo "<xmp>";
		print_r($v);
		echo "</xmp>\r\n";
	}
	echo "</div>\r\n";
}

function v() {
	$pare = func_get_args();
	foreach ($pare as $v) {
		echo "<xml>";
		var_dump($v);
		echo "</xml>";
	}
}

function redirection($page = 'user')
{
	header("location:?act={$page}");
	die;
}

function check_login()
{
	if (empty($_SESSION['user_name'])) {
		redirection();
		die();
	}
}

function return_info($error = true, $value = null)
{
	if ($error) {
		return array(
			'success' => true,
			'ret' => $value
			);
	} else {
		return array(
			'success' => false,
			'msg' => $value
			);
	}
}
?>